/**
 ******************************************************************************
 * @file    usbh_msc_core.h
 * @author  MCD Application Team
 * @version V1.0.0
 * @date    11/29/2010
 * @brief   This file contains all the prototypes for the usbh_msc_core.c
 ******************************************************************************
 * @copy
 *
 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
 *
 * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
 */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USBH_MSC_CORE_H
#define __USBH_MSC_CORE_H

/* Includes ------------------------------------------------------------------*/
#include "usbh_core.h"
#include "usbh_stdreq.h"
#include "usb_bsp.h"
#include "usbh_ioreq.h"
#include "usbh_hcs.h"
#include "usbh_msc_core.h"
#include "usbh_msc_scsi.h"
#include "usbh_msc_bot.h"

/** @addtogroup USBH_LIB
 * @{
 */

/** @addtogroup USBH_CLASS
 * @{
 */

/** @addtogroup USBH_MSC_CLASS
 * @{
 */

/** @defgroup USBH_MSC_CORE
 * @brief This file is the Header file for usbh_msc_core.c
 * @{
 */


/** @defgroup USBH_MSC_CORE_Exported_Types
 * @{
 */


/* Structure for MSC process */
typedef struct _MSC_Process
{
    uint8_t hc_num_in;
    uint8_t hc_num_out;
    uint8_t MSBulkOutEp;
    uint8_t MSBulkInEp;
    uint16_t MSBulkInEpSize;
    uint16_t MSBulkOutEpSize;

    uint8_t buff[64];
    uint8_t maxLun;
}
MSC_Machine_TypeDef;


/**
 * @}
 */



/** @defgroup USBH_MSC_CORE_Exported_Defines
 * @{
 */

#define USB_REQ_BOT_RESET                0xFF
#define USB_REQ_GET_MAX_LUN              0xFE


/**
 * @}
 */

/** @defgroup USBH_MSC_CORE_Exported_Macros
 * @{
 */
/**
 * @}
 */

/** @defgroup USBH_MSC_CORE_Exported_Variables
 * @{
 */
extern USBH_Class_cb_TypeDef MSC_cb;
extern MSC_Machine_TypeDef MSC_Machine;
extern uint8_t MSCErrorCount;

/**
 * @}
 */

/** @defgroup USBH_MSC_CORE_Exported_FunctionsPrototype
 * @{
 */
USBH_Status USBH_MSC_BOTReset(USB_OTG_CORE_HANDLE *pdev);
USBH_Status USBH_MSC_GETMaxLUN(USB_OTG_CORE_HANDLE *pdev);
USBH_Status USBH_MSC_Issue_BOTReset(USB_OTG_CORE_HANDLE *pdev);
USBH_Status USBH_MSC_Issue_GETMaxLUN(USB_OTG_CORE_HANDLE *pdev);
uint8_t  USBH_ParseClassDesc(USBH_InterfaceDesc_TypeDef* itf_desc, uint8_t *buf);


/**
 * @}
 */

#endif  /* __USBH_MSC_CORE_H */


/**
 * @}
 */

/**
 * @}
 */

/**
 * @}
 */

/**
 * @}
 */
/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/



